package com.terrynoya.node
{
	public class Node implements INode
	{
		private var _children:Array;
		private var _parent:INode;
		public function Node()
		{
			this._children = new Array();
		}
		
		public function get children():Array
		{
			return this._children;
		}
		
		public function get parent():INode
		{
			return this._parent;
		}
		
		public function set parent(value:INode):void
		{
			_parent = value;
		}
		
		public function hasChilren():Boolean
		{
			return this._children.length > 0;
		}
		
		public function addChild(node:INode):void
		{
			this._children.push(node);
		}
		
		public function getChildAt(index:int):INode
		{
			return this._children[index];
		}
	}
}